import requests
import json

url1 = "https://hdgateway.zto.com/getPriceTimeWithDat"

headers1 = {
    'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36',
'Host': 'hdgateway.zto.com',
'Origin': 'https://www.zto.com',
'Referer': 'https://www.zto.com/',
'sec-ch-ua': '" Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"',
}

data1 = {
'sendProvince': '上海',
'sendProvinceId': 310000,
'sendCity': '上海市',
'sendCityId': 310100,
'receiveProvince': '天津',
'receiveProvinceId': 120000,
'receiveCityId': 120100,
'receiveCity': '天津市',
'weight': 1,
'sendDate': '2022-02-20 22:50:41'
}

respond = requests.post(url1,data1,headers=headers1)

text = respond.json()

print(text)